get PopUpMenu("ResEdit;Fedit+;MacTools;(-;"& "Rename a File;Delete a File;DeProtect a Stack;ResCopy;"& "(-;Browsing;Typing;Painting;Authoring;Scripting;"& "(-;Quit;Warm Boot", 0, vert, horiz)
put it into choice
end if
if thisStack = "Home" then
get PopUpMenu("ResEdit;Fedit+;MacTools;(-;"& "(Rename a File;Delete a File;DeProtect a Stack;(ResCopy;"& "(-;Browsing;Typing;Painting;Authoring;Scripting;"& "(-;Quit;Warm Boot", 0, vert, horiz)
put it into choice
end if
set hilite of target to false
if choice = "0" then exit mousedown
if choice = "1" then open "CMS Hard Disk:Utilities Folder:**CAUTION**Disk Edit stuff:ResEdit1.1b3"
if choice = "2" then open "CMS Hard Disk:Utilities Folder:**CAUTION**Disk Edit stuff:Fedit Plus+"
if choice = "3" then open "CMS Hard Disk:Utilities Folder:**CAUTION**Disk Edit stuff:MacTools‚Ñ¢ 6.4"
if choice = "5" then
put "Please select a file to rename"
put filename() into renamethis
if renamethis is empty then
hide message window
beep
exit mousedown
end if
hide message window
put LastPathComponent(renamethis) into shortname
ask "What do you want to name this file" with shortname
if it is shortname or it is empty then
hide message window
beep
exit mousedown
end if
put RenameFile(renamethis,it) into returnedthis
if returnedthis = 0 then
answer "Everything went just fine"
else
if returnedthis < 0 then
OsErr returnedthis
else
answer "Whoops, there was an error"
end if
end if
end if
if choice = "6" then
put "Please select a file to delete"
put filename() into deletethis
if deletethis is empty then
hide message window
beep
exit mouseDown
end if
hide message window
answer "Are you sure you want to delete this?" with "Cancel" or "OK"
if it is "Cancel" then
beep
exit mouseDown
end if
put deletefile(deletethis) into returnedthis
if returnedthis = 0 then
answer "I hope you were sure, 'cause it's gone!"
else
if returnedthis < 0 then
OsErr returnedthis
else
answer "Whoops, there was an error"
end if
end if
end if
if choice = "7" then
put "Please select a protected stack"
set cursor to 4
put filename("STAK") into fname
if fname is empty then
hide message window
exit mousedown
end if
deprotect fname
if the result is empty
then answer "Deprotect Successful" with "OK"
else if the result is -49
then answer "Sorry, that file is busy."
else if the result is -44
then answer "Sorry, the disk is locked."
else answer "Failed: unexpected file system error: " & the result with "OK"
end if
if choice = "8" then resCopy
if choice = "10" then set UserLevel to 1
if choice = "11" then set UserLevel to 2
if choice = "12" then set UserLevel to 3
if choice = "13" then set userLevel to 4
if choice = "14" then set UserLevel to 5
if choice = "16" then
answer "Quit HyperCard?" with "Finder" or "ShutDown" or "Cancel"
if it is "Finder" then doMenu "Quit HyperCard"
if it is "ShutDown" then shutDown
if it is "Cancel" then exit mouseDown
end if
if choice = "17" then
answer "Re-boot?" with "Restart" or "ShutDown" or "Cancel"